<?php
$num = [1,2,4,5,6,8,0];
for ($i=0;$i<count($num);$i++){
    echo $num[$i]." ";
}

unset($num[2]);//删除4

foreach ($num as $key => $value){
    echo "\n".$num[$key]." ";
}

echo "\n";

$data = [
    'k1' => 'p1',
    'k2' => 'p2',
    'k3' => 'p3',
];
foreach ($data as $key => $value){
//    echo $key.'-----'.$value.' ';
    echo $data[$key].' ';
}


